package com.zeen.wima.common;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.zeen.wima.update.Updater;

public class BootReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
			Intent bootActivityIntent = new Intent(context, TraceService.class);
			bootActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
			context.startService(bootActivityIntent);
			//check updates
			
			Intent checkUpdate = new Intent(context,Updater.class);
			context.startService(checkUpdate);
		}
	}

}
